package com.zhongyu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhongyu.mapper.KuCunYvJingMapper;
import com.zhongyu.pojo.KuCuiYvJing;
import com.zhongyu.service.KuCunYvJingService;
import com.zhongyu.vo.PageResult;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("kuCunYvJingService")
public class KuCuiYvJingImpl extends ServiceImpl<KuCunYvJingMapper, KuCuiYvJing> implements KuCunYvJingService {
    @Resource
    private KuCunYvJingMapper kuCunYvJingMapper;
   /* @Resource
    private MailUtil mailUtil;*/
    @Override
    public PageResult searchAll(Integer pageNo, Integer pageSize) {
        LambdaQueryWrapper<KuCuiYvJing> wrapper= Wrappers.<KuCuiYvJing>lambdaQuery();
        Page page=new Page(pageNo,pageSize);
        List<KuCuiYvJing> list=kuCunYvJingMapper.findAll(page,wrapper);
        return new PageResult(list,page.getTotal());
    }


}
